package com.hourse.platform.exception;

import lombok.Getter;

import java.io.Serializable;

@Getter
public class ValidateException extends Exception implements Serializable {

  private Integer code = 10002;

  private String msg = "信息体校验未通过...";

  /**
   * Constructs a new exception with {@code null} as its detail message.
   * The cause is not initialized, and may subsequently be initialized by a
   * call to {@link #initCause}.
   */
  public ValidateException() {
    super();
  }

  /**
   * Constructs a new exception with {@code null} as its detail message.
   * The cause is not initialized, and may subsequently be initialized by a
   * call to {@link #initCause}.
   */
  public ValidateException(String msg) {
    super(msg);
    this.msg = msg;
  }

  /**
   * Constructs a new exception with {@code null} as its detail message.
   * The cause is not initialized, and may subsequently be initialized by a
   * call to {@link #initCause}.
   */
  public ValidateException(Integer code, String msg) {
    super();
    this.code = code;
    this.msg = msg;
  }
}
